//...

const obj1={name:"张三",age:20};
const obj2={gender:"male"};
const cloneObj={...obj1,...obj2};

const arr1=['red','green','blue'];
const arr2=["white","black"];
const cloneArr={...arr1};

console.log(cloneObj);
console.log(cloneArr);